package xml.uidElements.entry;

import java.util.List;

public class EnumeratedData extends DataEntryElement {

	private String name;
	private List<EnumeratedOption> listEnumeratedOptions;
	private Integer cardinalityMin;
	private Integer cardinalityMax;
	private boolean optional;

	public EnumeratedData(String name, List<EnumeratedOption> listOptions,
			Integer cardinalityMin, Integer cardinalityMax) {

		this.name = name;
		listEnumeratedOptions = listOptions;
		this.setCardinalityMin(cardinalityMin);
		this.setCardinalityMax(cardinalityMax);
	}

	@Override
	public String getName() {
		return name;
	}

	public void setCardinalityMin(Integer cardinalityMin) {
		this.cardinalityMin = cardinalityMin;
	}

	public int getCardinalityMin() {
		return cardinalityMin;
	}

	public void setCardinalityMax(Integer cardinalityMax) {
		this.cardinalityMax = cardinalityMax;
	}

	public int getCardinalityMax() {
		return cardinalityMax;
	}

	public void addEnumeratedOption(EnumeratedOption option) {
		listEnumeratedOptions.add(option);
	}

	public void setOptional(boolean optional) {
		this.optional = optional;
	}

	public boolean isOptional() {
		return optional;
	}

}
